package ren.edu.apollo.controller;

import com.ctrip.framework.apollo.spring.annotation.ApolloJsonValue;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import ren.edu.apollo.pojo.Student;

import java.util.List;

/**
 * @PackageName: ren.edu.apollo.controller
 * @ClassName: ApolloStudentController
 * @Description:
 * @author: RZS
 * @date: 2021/7/17  23:16
 */
@RestController
@RequestMapping("/student")
public class ApolloStudentController {

    @ApolloJsonValue("${stus:[]}")
    private List<Student> stus;

    @GetMapping("/get")
    public List<Student> apolloGetStus(){
        return stus;
    }
}
